﻿"use strict";
define(['framework/routerConfig'], function (mod) {
    var config = ['$rootScope', '$state', '$urlRouter', '$http', function ($rootScope, $state, $urlRouter, $http) {
        $rootScope.menu = mod.getMenu("main");
        
        $rootScope.active = function (top) {
            var level = mod._stateLevelMap['main'];
            if (level) {
                level = level[$state.current.name];
                $rootScope.SelectedMenu = level;
                return level && (top[0] == level[0]);
            }
            return false;
        }
        $urlRouter.sync();

    }];
    return config;
});